home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / www / cgi-bin / tarsend-cgi < prev    next >
Encoding:
Text File  |  1996-11-11  |  1.2 KB  |  29 lines

  1. #!/usr/bin/perl
  2.  
  3. print "Content-type: text/html\n\n";
  4.  
  5. print "<html><head><link rev=\"made\" href=\"mailto:DTjanitor\@sgi.com\"><title>D.T. CGI clean-up Prog for Sending Compressed Tar Image of Directory Contents</title></head><body>";
  6. print "<h1>Developer Toolbox:<br>help the silly janitor clean-up his mess,<br> and get back to where you left off . . . </h1>";
  7. print "<hr size=\"6\">";
  8. print "the d.t. webchowderhead appreciates yer help <i>and patience</i> while he continues<br>\n" ;
  9. print "learning how to implement http cgi-bin forms in a more intelligent manner<br>\n ";
  10. print "than that which yer being subjected to at this time. . . .";
  11. print "<p>";
  12.  
  13. # PATH_INFO is the "relative path" from Doc root (with a leading `/' char)
  14. $ret2begin = $ENV{'PATH_INFO'};
  15.  
  16. # QUERY_STRING stores the name of the subdir who's "parent dir" is
  17. # is the one that PATH_INFO and PATH_TRANSLATED point to.
  18. $rmcmd = $ENV{'QUERY_STRING'} ;
  19.  
  20. $urlline = "\"$ret2begin\"" ;
  21. print "<h2><tt>Enough of this--</tt><a href=" . "$urlline" . ">Back to whence you came!</a></h2>" ;
  22.  
  23. $fullrmcmd = "/bin/rm -rf " . "$rmcmd" ;
  24. $res = system ("$fullrmcmd");
  25.  
  26. print "<hr size=\"6\">";
  27. print "</body>";
  28. print "</html>";
  29.